<div class="modal-content">
    <div class="modal-header">
        <button class="close" ng-click="cancel()" type="button">
            <span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
        </button>
        <h4 class="modal-title">数据库实例</h4>
    </div>
    <div class="modal-body">
        <div class="wrapper wrapper-content animated fadeInRight">
            <form action="" class="form-horizontal m-t-md " name="myForm"
                  novalidate>
                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>系统名称:</label>
                    <div class="col-sm-10">
                        <input class="form-control ng-pristine" name="name"
                               ng-disabled="true"
                               ng-model="item.xtname" placeholder="请输入系统名称" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>数据库实例名称:</label>
                    <div class="col-sm-10">
                        <input class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="dbinstance" ng-maxlength="30"
                               ng-model="item.dbinstance"
                               placeholder="请输入数据库实例名称" required type="text">
                        <div class="text-danger"
                             ng-if="myForm.dbinstance.$dirty && myForm.dbinstance.$invalid">
                            <span ng-if="myForm.dbinstance.$error.required"> 输入不能为空 </span> <span
                                ng-show="myForm.dbinstance.$error.maxlength">不能超过30个字符 </span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>备份策略:</label>
                    <div class="col-sm-10">
                        <input class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="bkstrategy" ng-maxlength="200" ng-model="item.bkstrategy"
                               placeholder="请输入备份策略"
                               required string-to-number type="text">
                        <div class="text-danger"
                             ng-if="myForm.bkstrategy.$dirty && myForm.bkstrategy.$invalid">
                            <span ng-if="myForm.bkstrategy.$error.required"> 输入不能为空 </span> <span
                                ng-show="myForm.bkstrategy.$error.maxlength">不能超过200个字符 </span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>保留策略:</label>
                    <div class="col-sm-10">
                        <input class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="bkkeep" ng-maxlength="200" ng-model="item.bkkeep"
                               placeholder="请输入保留策略"
                               required string-to-number type="text">
                        <div class="text-danger"
                             ng-if="myForm.bkkeep.$dirty && myForm.bkkeep.$invalid">
                            <span ng-if="myForm.bkkeep.$error.required"> 输入不能为空 </span> <span
                                ng-show="myForm.bkkeep.$error.maxlength">不能超过200个字符 </span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">备份类型:</label>
                    <div class="col-sm-10">
                        <select chosen class="chosen-select" data-placeholder-text-single="'请选择...'"
                                disable-search="true" ng-model="bktypeSel"
                                ng-options="item.name for item in bktypeOpt"
                                no-results-text="'没有找到相应条目'">
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">备份方式:</label>
                    <div class="col-sm-10">
                        <select chosen class="chosen-select" data-placeholder-text-single="'请选择...'"
                                disable-search="true" ng-model="bkmethodSel"
                                ng-options="item.name for item in bkmethodOpt"
                                no-results-text="'没有找到相应条目'">
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">日志类型:</label>
                    <div class="col-sm-10">
                        <select chosen class="chosen-select" data-placeholder-text-single="'请选择...'"
                                disable-search="true" ng-model="archtypeSel"
                                ng-options="item.name for item in archtypeOpt"
                                no-results-text="'没有找到相应条目'">
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">备份现状:</label>
                    <div class="col-sm-10">
                        <select chosen class="chosen-select" data-placeholder-text-single="'请选择...'"
                                disable-search="true" ng-model="bkstatusSel"
                                ng-options="item.name for item in bkstatusOpt"
                                no-results-text="'没有找到相应条目'">
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">备份大小:</label>
                    <div class="col-sm-10">
                        <input class="form-control ng-pristine ng-untouched ng-valid ng-empty"
                               name="bkkeep"
                               ng-model="item.dsize" placeholder="请输入备份大小" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">备注:</label>
                    <div class="col-sm-10">
                        <input class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="mark"
                               ng-maxlength="200"
                               ng-model="item.mark" placeholder="请输入备注" type="text">
                        <div class="text-danger"
                             ng-show="myForm.mark.$dirty && myForm.mark.$invalid">
                            <span ng-show="myForm.mark.$error.maxlength">不能超过20个字符 </span>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="modal-footer" style="text-align: center">
        <button class="btn btn-warning" ng-click="cancel()">取消</button>
        <button class="btn btn-primary" ng-click="sure()"
                ng-disabled="myForm.$invalid">确认
        </button>
    </div>
</div>
